package com.tvunetworks.center.user.mapper;

import com.tvunetworks.center.gs.model.TokenRequest;
import org.apache.ibatis.annotations.Param;
import tk.mybatis.mapper.common.Mapper;

import java.util.List;
import java.util.Set;

/**
 * @program:
 * @description:
 * @author HenryChen
 * @create: 5/29/2019 12:17 PM
 **/

public interface TokenRequestMapper extends Mapper<TokenRequest> {
    /**
     *
     * @param userId userId
     * @param status status
     * @return List
     */
    List<String> listUserGridTokenRequest(@Param("userId") String userId, @Param("status") int status);

    /**
     *
     * @param userId userId
     * @param peerIds peerIds
     * @param status status
     * @return List
     */
    List<String> listTokenRequest(@Param("userId") String userId, @Param("peerIds") Set<String> peerIds, @Param("status") int status);

    /**
     * 根据peerId,查出设备通过Token配对的另一设备
     * @param peerIds peerIds
     * @return 配对的其他设备peerId
     */
    List<String> getDeviceByPeerIds( @Param("peerIds")  List<String> peerIds);
}
